<?php
declare (strict_types = 1);

namespace app\command;

use app\models\WxMessageRecords;
use app\services\WeikeyunService;
use app\services\WxService;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;

class WkyOrders extends Command
{
    protected function configure()
    {
        // 指令配置
        $this->setName('synchro:wkyOrders')
            ->setDescription('同步微客云订单信息');
    }

    protected function execute(Input $input, Output $output)
    {
        try {
            $service = new WeikeyunService();

            $service->getAccessToken();

            $service->getOrderLists();
        } catch (\Exception $e) {
            throw new \Exception($e->getMessage(), 500);
        }
    }
}
